***********************************************************************************
***	Replication file for:                                                     	***
*** Braun, S. T. and Stuhler, J. (2024). The Economic Consequences of 			***
***	Being Widowed by War: A Life-Cycle Perspective.	     						***
***																				***
***	Journal of Public Economics                                                 ***
***   							                                                ***
*** Script:		1-mzu-71-dataprep.do							   			 	***	
*** Purpose:	data preparation, MZU 1971										***
***																				***
*** Tables:		---																***
***	Figures:	---																***
***********************************************************************************

*** Load data
use "D:\WorkExtern\Daten\mzu71r.dta", clear

********************************************************************************
*** Relabel and recode variables
********************************************************************************

********************************************************************************
** A. Demographic variables
********************************************************************************

tab v4 
recode v4 1=1 2=2 3=1 4=2, generate(sex)
label variable sex "Sex"
#delimit ;
label define sexlabel
	1 "Male"
	2 "Female";
#delimit cr
label values sex sexlabel

gen 	d_female = .
replace	d_female = 0 if sex == 1
replace d_female = 1 if sex == 2
label variable d_female "Female (0/1)"
tab 	d_female

tab v5
gen birth_year = v5 + 1800
tab birth_year
label variable birth_year "Birth year"

gen 	marital_status = v7
#delimit ;
label define marlabel
	1 "Single, never married"
	2 "Married"
	3 "Widowed"
	4 "Divorced";
#delimit cr
label values marital_status marlabel
label variable marital_status "Marital status in 1971"
tab marital_status

gen marriage_year = v8 + 1800 if marital_status == 2
recode marriage_year 1972 = . 
label variable marriage_year "Year of marriage (for those married)"
tab marriage_year

gen siblings = v13
label variable siblings "# siblings (including surveyed person)"

gen kids_1971 = v14
label variable kids_1971 "# own kids in 1971"

gen d_warwidow = 0 if d_female == 1
replace d_warwidow = 1 if v61 == 2
label variable d_warwidow "Widow of WWII (0/1, only women)"
tab d_warwidow

gen d_expellee = 0 if v64 != 5
replace d_expellee = 1 if v64 == 3 
label var d_expellee "Residence on 1/9/1939 in Eastern territories or Eastern Europe (0/1)"

gen d_SBZ = 0 if v64 != 5
replace d_SBZ = 1 if v64 == 2
label var d_SBZ "Residence on 1/9/1939 in SBZ (0/1)"

gen d_native = 0 if v64 != 5
replace d_native = 1 if inlist(v64, 1, 4)
label var d_native "Residence on 1/9/1939 in W Germany, other regions (0/1)"

recode v74 1=1 2 3=2 4=3, gen(refugee_status)
#delimit ;
label define reflab
	1 "Displaced"
	2 "SBZ refugee/migrant"
	3 "Other";
#delimit cr
label values refugee_status reflab
label variable refugee_status "Refugee status"
tab refugee_status

bysort hhnr v106: egen no_hh_pers = max(persnr) 
label var no_hh_pers "Number of individuals in the household (#)"

gen help = (v103 == 5)
bysort hhnr v106: egen non_family_person = max(help) 
label var non_family_person "Non-family person in the household (0/1)"
drop help


********************************************************************************
** B. Wealth and income
********************************************************************************

gen 	d_houseowner_1939 = .
replace d_houseowner_1939 = 0 if v18 == 1
replace d_houseowner_1939 = 1 if v18 == 2
label variable d_houseowner_1939 "House ownership in 1939 (0/1)?"
tab d_houseowner_1939

gen 	d_houseowner_1971 = .
replace d_houseowner_1971 = 0 if v19 == 1
replace d_houseowner_1971 = 1 if v19 == 2
label variable d_houseowner_1971 "House ownership in 1971 (0/1)?"
tab d_houseowner_1971

gen	income_1971 = v31
recode income_1971 8 = . if inrange(v22, 20, 25) /* Self-employed farmers */ 
recode income_1971 8 = 0 if inlist(v22, 12, 35) /* Housewife, helping family */
recode income_1971 8 = . 9=. 10 = 0
#delimit ;
label define inclabel
	0 "No income"
	1 "< 150"
	2 "150 - <300"
	3 "300 - <600"
	4 "600 - <800"
	5 "800 - <1200"
	6 "1200 - <1800"
	7 ">= 1800";
#delimit cr
label values income_1971 inclabel
tab income_1971

gen 	income_source = v27
recode	income_source 6 = .
#delimit ;
label define incslabel
	1 "Employment, pension, wealth"
	2 "Welfare support"
	3 "Unemployment benefits"
	4 "Support from parents or spouse"
	5 "Soldier";
#delimit cr 
label values income_source incslabel
label var income_source "Source of main income"
tab income_source

gen d_welfare_support = (income_source == 2)
label var d_welfare_support "Welfare as main income source (0/1)?"

gen d_own_income = (income_source == 1)
label var d_own_income "Employment, pension, wealth as main income source (0/1)?"

gen 	income_midpoints_level = 0 if income_1971 == 0
replace income_midpoints_level = 75 if income_1971 == 1
replace income_midpoints_level = 225 if income_1971 == 2
replace income_midpoints_level = 450 if income_1971 == 3
replace income_midpoints_level = 700 if income_1971 == 4
replace income_midpoints_level = 1000 if income_1971 == 5
replace income_midpoints_level = 1500 if income_1971 == 6
replace income_midpoints_level = 1.4*1800 if income_1971 == 7


* Household per capita income (square root scale)
bysort hhnr v106: egen help = total(income_midpoints_level) 
gen help2 = (income_midpoints_level == .)
bysort hhnr v106: egen help3 = max(help2)
replace help = . if help3 == 1 
gen hh_income_pc = help / (no_hh_pers)^0.5
drop help help2 help3
label var hh_income_pc "Household income per capita (square root equivalence scale)" 

********************************************************************************
** C. Education / Schooling
********************************************************************************

** Years of education with apprenticeships
** see Walter Müller "Schuldbildung und Weiterbvildung als soziologische Hintergrundsvariablen,"
** in: Franz Urban Pappi (ed.), Sozialstrukturanalyse mit Umfragedaten, Königstein, 1979, p. 186.
** Versuch 1 (gewerbliche Lehre 2 Jahre, kaufmännische Lehre 3 Jahre)

tab v9 
tab v12

gen		years_education = .
replace years_education = 17 if v9 == 9
replace years_education = 15 if v9 == 8
replace years_education = 14 if v9 == 7 & v12 == 2
replace years_education = 13 if v9 == 7 & inlist(v12, 3, 4)
replace years_education = 11 if v9 == 7 & v12 == 1
replace years_education = 13 if v9 == 6 
replace years_education = 15 if v9 == 5 & inlist(v12, 2, 3, 4)
replace years_education = 13 if v9 == 5 & v12 == 1
replace years_education = 13 if v9 == 4 & v12 == 2
replace years_education = 12 if v9 == 4 & inlist(v12, 3, 4)
replace years_education = 10 if v9 == 4 & v12 == 1
replace years_education = 11 if inlist(v9, 1, 2, 3) & v12 == 2
replace years_education = 10 if inlist(v9, 1, 2, 3) & inlist(v12, 3, 4) 
replace years_education = 8 if inlist(v9, 1, 2, 3) & v12 == 1
label variable years_education "Years of education (including apprenticeships)"
tab years_education


** Years of schholing without apprenticeships

gen 	years_schooling = .
replace years_schooling = 17 if v9 == 9
replace years_schooling = 15 if v9 == 8
replace years_schooling = 11 if v9 == 7
replace years_schooling = 13 if v9 == 6
replace years_schooling = 13 if v9 == 5
replace years_schooling = 10 if v9 == 4
replace years_schooling = 8 if v9 == 3
replace years_schooling = 8 if v9 == 2
replace years_schooling = 8 if v9 == 1
label variable years_schooling "Years of schooling (excluding apprenticeships)"

tab years_schooling years_education


********************************************************************************
** D. Labour force participation
********************************************************************************

** Year 1939

* Occupational categories (10) 

gen occ_cat10_1939 = .

replace occ_cat10_1939 = 1 if inrange(v54, 1, 7)
replace occ_cat10_1939 = 2 if inrange(v54, 26, 30)
replace occ_cat10_1939 = 3 if inrange(v54, 20, 25)
replace occ_cat10_1939 = 4 if inrange(v54, 40, 43)
replace occ_cat10_1939 = 5 if inrange(v54, 50, 54)
replace occ_cat10_1939 = 6 if inrange(v54, 60, 64)
replace occ_cat10_1939 = 7 if inrange(v54, 70, 74)
replace occ_cat10_1939 = 8 if v54 == 35
replace occ_cat10_1939 = 9 if v54 == 10
replace occ_cat10_1939 = 10 if inrange(v54, 11, 13)

#delimit ;
label define occ_cat10_lab
	1 "In education"
	2 "Self employed"
	3 "Farmer"
	4 "Civil servants"
	5 "White collar"
	6 "Blue collar"
	7 "Apprenticeship"
	8 "Working family member"
	9 "Unemployed"
	10 "Out of the labour force";
#delimit cr

label value occ_cat10_1939 occ_cat10_lab
label variable occ_cat10_1939 "Occuational status in 1939, ten categories" 


* Occupational categories (4)

recode occ_cat10_1939 2 3 4 5 6 7=1 8=2 9=3 1 10=4, gen(occ_cat4_1939)  
#delimit ;
label define occ_cat4_lab
	1 "Market employment"
	2 "Working family member"
	3 "Unemployed"
	4 "Out of the labour force";
#delimit cr

label value occ_cat4_1939 occ_cat4_lab
label variable occ_cat4_1939 "Occuational status in 1939, four categories
tab occ_cat4_1939

tab occ_cat4_1939, gen(d_status_1939_cat)

* Employment

gen d_employed_1939 = (occ_cat4_1939 == 1 | occ_cat4_1939 == 2)
replace d_employed_1939 = . if occ_cat4_1939 == . 
label var d_employed_1939 "Employed in 1939 (0/1)"

* Sector classification (6)

gen sector_cat6_1939 = 0
replace sector_cat6_1939 = 1 if v55 == 80
replace sector_cat6_1939 = 2 if inlist(v55, 81, 82)
replace sector_cat6_1939 = 3 if v55 == 83
replace sector_cat6_1939 = 4 if inlist(v55, 84, 85, 87)
replace sector_cat6_1939 = 5 if inlist(v55, 86, 88, 91)
replace sector_cat6_1939 = 6 if inlist(v55, 89, 90, 92, 93, 94)

#delimit ;
label define sec_cat6_lab
	0 "Unknown"
	1 "Agriculture, forestry"
	2 "Industry, mining"
	3 "Construction"
	4 "Trade, transport, hotels"
	5 "Finance, renting, business services"
	6 "Public and private services";
#delimit cr

label value sector_cat6_1939 sec_cat6_lab
label variable sector_cat6_1939 "Sectoral affiliation 1939, six categories"

tab sector_cat6_1939

* Sector classification (3)

recode sector_cat6_1939 0=0 1=1 2 3=2 4 5 6=3, gen(sector_cat3_1939)  
#delimit ;
label define sec_cat3_lab
	0 "Unknown"
	1 "Agriculture, forestry"
	2 "Industry, mining, construction"
	3 "Public and private services";
#delimit cr

label value sector_cat3_1939 sec_cat3_lab
label variable sector_cat3_1939 "Sectoral affiliation 1939, three categories"
tab sector_cat3_1939

tab sector_cat3_1939 sector_cat6_1939

tab sector_cat3_1939, gen(d_sector_1939_cat)



** 1950

* Occupational categories (10) 

gen occ_cat10_1950 = .

replace occ_cat10_1950 = 1 if inrange(v52, 1, 7)
replace occ_cat10_1950 = 2 if inrange(v52, 26, 30)
replace occ_cat10_1950 = 3 if inrange(v52, 20, 25)
replace occ_cat10_1950 = 4 if inrange(v52, 40, 43)
replace occ_cat10_1950 = 5 if inrange(v52, 50, 54)
replace occ_cat10_1950 = 6 if inrange(v52, 60, 64)
replace occ_cat10_1950 = 7 if inrange(v52, 70, 74)
replace occ_cat10_1950 = 8 if v52 == 35
replace occ_cat10_1950 = 9 if v52 == 10
replace occ_cat10_1950 = 10 if inrange(v52, 11, 13)

label value occ_cat10_1950 occ_cat10_lab
label variable occ_cat10_1950 "Occuational status in 1950, ten categories" 
tab occ_cat10_1950

* Occupational categories (4)
recode occ_cat10_1950 2 3 4 5 6 7=1 8=2 9=3 1 10=4, gen(occ_cat4_1950) 
label value occ_cat4_1950 occ_cat4_lab
label variable occ_cat4_1950 "Occuational status in 1950, four categories
tab occ_cat4_1950

tab occ_cat4_1950, gen(d_status_1950_cat)

* Employment

gen d_employed_1950 = (occ_cat4_1950 == 1 | occ_cat4_1950 == 2)
replace d_employed_1950 = . if occ_cat4_1950 == .
label var d_employed_1950 "Employed in 1950 (0/1)"

* Sector classification (6)

gen sector_cat6_1950 = 0
replace sector_cat6_1950 = 1 if v53 == 80
replace sector_cat6_1950 = 2 if inlist(v53, 81, 82)
replace sector_cat6_1950 = 3 if v53 == 83
replace sector_cat6_1950 = 4 if inlist(v53, 84, 85, 87)
replace sector_cat6_1950 = 5 if inlist(v53, 86, 88, 91)
replace sector_cat6_1950 = 6 if inlist(v53, 89, 90, 92, 93, 94)

label value sector_cat6_1950 sec_cat6_lab
label variable sector_cat6_1950 "Sectoral affiliation 1950, six categories"

tab sector_cat6_1950

* Sector classification (3)

recode sector_cat6_1950 0=0 1=1 2 3=2 4 5 6=3, gen(sector_cat3_1950)  

label value sector_cat3_1950 sec_cat3_lab
label variable sector_cat3_1950 "Sectoral affiliation 1950, three categories"
tab sector_cat3_1950

tab sector_cat3_1950 sector_cat6_1950

tab sector_cat3_1950, gen(d_sector_1950_cat)


** 1960

* Occupational categories (10) 

gen occ_cat10_1960 = .

replace occ_cat10_1960 = 1 if inrange(v20, 1, 7)
replace occ_cat10_1960 = 2 if inrange(v20, 26, 30)
replace occ_cat10_1960 = 3 if inrange(v20, 20, 25)
replace occ_cat10_1960 = 4 if inrange(v20, 40, 43)
replace occ_cat10_1960 = 5 if inrange(v20, 50, 54)
replace occ_cat10_1960 = 6 if inrange(v20, 60, 64)
replace occ_cat10_1960 = 7 if inrange(v20, 70, 74)
replace occ_cat10_1960 = 8 if v20 == 35
replace occ_cat10_1960 = 9 if v20 == 10
replace occ_cat10_1960 = 10 if inrange(v20, 11, 13)

label value occ_cat10_1960 occ_cat10_lab
label variable occ_cat10_1960 "Occuational status in 1960, ten categories" 
tab occ_cat10_1960

* Occupational categories (4)
recode occ_cat10_1960 2 3 4 5 6 7=1 8=2 9=3 1 10=4, gen(occ_cat4_1960) 
label value occ_cat4_1960 occ_cat4_lab
label variable occ_cat4_1960 "Occuational status in 1960, four categories
tab occ_cat4_1960

tab occ_cat4_1960, gen(d_status_1960_cat)

* Employment

gen d_employed_1960 = (occ_cat4_1960 == 1 | occ_cat4_1960 == 2)
replace d_employed_1960 = . if occ_cat4_1960 == .
label var d_employed_1960 "Employed in 1960 (0/1)"

* Sector classification (6)

gen sector_cat6_1960 = 0
replace sector_cat6_1960 = 1 if v21 == 80
replace sector_cat6_1960 = 2 if inlist(v21, 81, 82)
replace sector_cat6_1960 = 3 if v21 == 83
replace sector_cat6_1960 = 4 if inlist(v21, 84, 85, 87)
replace sector_cat6_1960 = 5 if inlist(v21, 86, 88, 91)
replace sector_cat6_1960 = 6 if inlist(v21, 89, 90, 92, 93, 94)

label value sector_cat6_1960 sec_cat6_lab
label variable sector_cat6_1960 "Sectoral affiliation 1960, six categories"

tab sector_cat6_1960

* Sector classification (3)

recode sector_cat6_1960 0=0 1=1 2 3=2 4 5 6=3, gen(sector_cat3_1960)  

label value sector_cat3_1960 sec_cat3_lab
label variable sector_cat3_1960 "Sectoral affiliation 1960, three categories"
tab sector_cat3_1960

tab sector_cat3_1960 sector_cat6_1960

tab sector_cat3_1960, gen(d_sector_1960_cat)


** 1971

* Occupational categories (10) 

gen occ_cat10_1971 = .

replace occ_cat10_1971 = 1 if inrange(v22, 1, 7)
replace occ_cat10_1971 = 2 if inrange(v22, 26, 30)
replace occ_cat10_1971 = 3 if inrange(v22, 20, 25)
replace occ_cat10_1971 = 4 if inrange(v22, 40, 43)
replace occ_cat10_1971 = 5 if inrange(v22, 50, 54)
replace occ_cat10_1971 = 6 if inrange(v22, 60, 64)
replace occ_cat10_1971 = 7 if inrange(v22, 70, 74)
replace occ_cat10_1971 = 8 if v22 == 35
replace occ_cat10_1971 = 9 if v22 == 10
replace occ_cat10_1971 = 10 if inrange(v22, 11, 13)

label value occ_cat10_1971 occ_cat10_lab
label variable occ_cat10_1971 "Occuational status in 1971, ten categories" 
tab occ_cat10_1971


* Occupational categories (4)
recode occ_cat10_1971 2 3 4 5 6 7=1 8=2 9=3 1 10=4, gen(occ_cat4_1971) 
label value occ_cat4_1971 occ_cat4_lab
label variable occ_cat4_1971 "Occuational status in 1971, four categories
tab occ_cat4_1971

tab occ_cat4_1971, gen(d_status_1971_cat)

* Employment

gen d_employed_1971 = (occ_cat4_1971 == 1 | occ_cat4_1971 == 2)
replace d_employed_1971 = . if occ_cat4_1971 == .
label var d_employed_1971 "Employed in 1971 (0/1)"

* Sector classification (6)

gen sector_cat6_1971 = 0
replace sector_cat6_1971 = 1 if v23 == 80
replace sector_cat6_1971 = 2 if inlist(v23, 81, 82)
replace sector_cat6_1971 = 3 if v23 == 83
replace sector_cat6_1971 = 4 if inlist(v23, 84, 85, 87)
replace sector_cat6_1971 = 5 if inlist(v23, 86, 88, 91)
replace sector_cat6_1971 = 6 if inlist(v23, 89, 90, 92, 93, 94)

label value sector_cat6_1971 sec_cat6_lab
label variable sector_cat6_1971 "Sectoral affiliation 1971, six categories"

tab sector_cat6_1971

* Sector classification (3)

recode sector_cat6_1971 0=0 1=1 2 3=2 4 5 6=3, gen(sector_cat3_1971)  

label value sector_cat3_1971 sec_cat3_lab
label variable sector_cat3_1971 "Sectoral affiliation 1971, three categories"
tab sector_cat3_1971

tab sector_cat3_1971 sector_cat6_1971

tab sector_cat3_1971, gen(d_sector_1971_cat)


********************************************************************************
** E. Sample restrictions
********************************************************************************

** General: Born 1906-14 (aged 25-33 in 1939, 36-44 in 1950, 46-54 in 1960, 57-65 in 1971) 
** Treatment group: war widows
** Control group: 
**		Baseline: Married 1945 or earlier, non-war widows, divorced 
**				  Two problems (both arguably small, see Appendix B for details): 
**				  First, we cannot exclude the possibility that divorced or widowed women in our control group married only after 1945.
**				  Second, married women who married after 1945, whom we exclude from the analysis, could in principle have been in 
**				  an earlier marriage during the war.
**		Robustness 1: Control group: Married women (married 1945 or earlier) -- Compared to baseline, widowed and divorced women in the control group (as of 1971) are dropped.
**		Robustness 2: Control group: Ever married women -- Compared to baseline, the control group also includes women who were married in 1971 but whose last marriage was after 1945.
** 		Robustness 3: Cohort: Born 1919-21 (to have a comparison to the LVS results) 
**		Robustness 4: Cohort: Born 1915-21 (do results extend to younger women?) 



gen sample_baseline = 0
replace sample_baseline = 1 if inrange(birth_year, 1906, 1914) & d_female == 1 & (d_warwidow == 1 | (marital_status == 2 & marriage_year <= 1945) | marital_status == 3 | marital_status == 4)
label var sample_baseline "Baseline sample: Females born 1906-1914; 1971: married 1945 or earlier, non-war widows, divorced"

gen sample_rob1 = 0
replace sample_rob1 = 1 if inrange(birth_year, 1906, 1914) & d_female == 1 & (d_warwidow == 1 | (marital_status == 2 & marriage_year <= 1945))
label var sample_rob1 "Robustness sample 1: Females born 1906-1914; 1971: married 1945 or earlier"

gen sample_rob2 = 0
replace sample_rob2 = 1 if inrange(birth_year, 1906, 1914) & d_female == 1 & (d_warwidow == 1 | (marital_status == 2 | marital_status == 3 | marital_status == 4))
label var sample_rob2 "Robustness sample 2: Females born 1906-1914; 1971: married, non-war widows, divorced"

gen sample_rob3 = 0 
replace sample_rob3 = 1 if inrange(birth_year, 1919, 1921) & d_female == 1 & (d_warwidow == 1 | (marital_status == 2 & marriage_year <= 1945) | marital_status == 3 | marital_status == 4)
label var sample_rob3 "Robustness sample 3: Females born 1919-1921; 1971: married 1945 or earlier, non-war widows, divorced"

gen sample_rob4 = 0 
replace sample_rob4 = 1 if inrange(birth_year, 1915, 1921) & d_female == 1 & (d_warwidow == 1 | (marital_status == 2 & marriage_year <= 1945) | marital_status == 3 | marital_status == 4)
label var sample_rob4 "Robustness sample 4: Females born 1915-1921; 1971: married 1945 or earlier, non-war widows, divorced"


********************************************************************************
** F. Survey weights & others
********************************************************************************

* Survey weights
* Schmipl-Neimanns (2016). MZU "Berufliche und soziale Umschichtung der Bevölkerung", April 1971 -- Revision der Ordnungsnummern und Hinweise zur Hochrechnung 
recode v106 (1 2 5 = 1) (3 4 = 0), gen(weights_adj)
replace weights_adj = weights_adj / 0.01 / 1000
label var weights_adj "Adjustment weights (in 1000)"

rename awbnr district_no 
label var district_no "Number of selected district (Auswahlbezirke), for clustering"

rename v106 case_type
#delimit ;
label define caselab
	1 "Supplemented case"
	2 "Doubled case"
	3 "Drawn case"
	4 "Non-residential population"
	5 "Normal case";
#delimit cr
label values case_type caselab
label var case_type "Case type (for survey weights)"

* ``Anpassung an die Bevölkerungsfortschreibung'', to avoid potential double counting persons interviewed at the place of secondary residence (Nebenwohnsitz) 
* who are not part of the resident population are dropped
* See Schmipl-Neimanns (2016) for details
drop if weights_adj == 0 
drop weights_adj


********************************************************************************
** Order and select variables, save data
********************************************************************************

gen ___sample____________ = .
order ___sample____________ sample_baseline sample_rob1 sample_rob2 sample_rob3 sample_rob4 district_no case_type, first

gen ___demography_______ = .
order ___demography_______ d_female birth_year marital_status marriage_year no_hh_pers non_family_person siblings kids_1971, after(case_type)

gen ___war_experience_____ = .
order ___war_experience_____ d_warwidow d_expellee d_SBZ d_native refugee_status, after(kids_1971)

gen ___income_wealth______ = .
order ___income_wealth______ income_midpoints_level hh_income_pc income_source d_welfare_support d_own_income d_houseowner_1939 d_houseowner_1971, after(refugee_status)

gen ___education_________ = .
order ___education_________ years_education years_schooling, after(d_houseowner_1971)

gen ___labour_market_______ = .
order ___labour_market_______ occ_cat10_1939 occ_cat4_1939 d_status_1939_cat1 d_status_1939_cat2 d_status_1939_cat3 d_status_1939_cat4 d_employed_1939 sector_cat6_1939 sector_cat3_1939 d_sector_1939_cat1 d_sector_1939_cat2 d_sector_1939_cat3 d_sector_1939_cat4 occ_cat10_1950 occ_cat4_1950 d_status_1950_cat1 d_status_1950_cat2 d_status_1950_cat3 d_status_1950_cat4 d_employed_1950 sector_cat6_1950 sector_cat3_1950 d_sector_1950_cat1 d_sector_1950_cat2 d_sector_1950_cat3 d_sector_1950_cat4  occ_cat10_1960 occ_cat4_1960 d_status_1960_cat1 d_status_1960_cat2 d_status_1960_cat3 d_status_1960_cat4 d_employed_1960 sector_cat6_1960 sector_cat3_1960 d_sector_1960_cat1 d_sector_1960_cat2 d_sector_1960_cat3 d_sector_1960_cat4 occ_cat10_1971 occ_cat4_1971 d_status_1971_cat1 d_status_1971_cat2 d_status_1971_cat3 d_status_1971_cat4 d_employed_1971 sector_cat6_1971 sector_cat3_1971 d_sector_1971_cat1 d_sector_1971_cat2 d_sector_1971_cat3 d_sector_1971_cat4, after(years_schooling)

keep  ___sample____________ - d_sector_1971_cat4

save "$widowsdir/processed/mzu1971-edit.dta", replace





		